1. Technical Field
The present invention relates to a system for recording and reproducing an optical disk and, more particularly, to a data compensating method and apparatus for compensating a block from which data cannot be read in reproducing the optical disk due to the presence of scratches.
2. Related Art
In general, a host interfaces with various peripheral devices such as hard disk drives, mouses, and CD-ROM drives to access MPEG (Moving Picture Experts Group) data. When the host requests the transmission of a particular piece of data, a pickup seeks a disk to find an address of the desired data. Then, MPEG data reproduced by the pickup undergoes signal processing, such as decoding, and is buffered in order to transmit the data to the host. Conventionally, pauses may occur in an apparatus for reproducing a disk recorded according to the MPEG standards due to the presence of scratches or foreign material on a particular block. When a pause occurs, the reproducing apparatus continues to retry read operations at the same position on the disk. In this case, since the host allocates a large amount of memory to the reading of data encoded onto an optical disk, other programs are difficult to run. In the worst scenario, the host may not read the MPEG data from the disk.
To solve the above problems, it is a first object of the present invention to provide a method of compensating data using an extra block region if a scratch or dust exists on an optical disk.
It is a second object of the present invention to provide an optical disk reproducing apparatus for compensating data using an extra block region if a scratch or dust exists on a disk.
In order to achieve the first object, the present invention provides a method of compensating data recorded on a disk including the steps of: (a) setting a first block region for storing a block of data currently being reproduced and a second block region for storing the previous block of data, and reproducing the disk according to a read command; (b) determining the type of a data block from a header in a sought block if the number of seek operations is greater than a predetermined value in reproducing the disk in step (a); (c) substituting an address of a block of data in the second block region, corresponding to a data block determined in step (b), for an address requested by a host; and (d) transmitting to the host the block of data in the second block region substituted in step (c).
In order to achieve the second object, the present invention provides an optical disk reproducing apparatus for compensating data recorded on a disk. The apparatus includes: a buffer having a first region for storing a block of data currently being reproduced and a second region for storing the previous block of data; a signal processor that digitizes an input signal, stores a block of data in the buffer, and demultiplexes the block of data; and a controller that determines the type of data from a header in the block of data demultiplexed by the signal processor, substitutes an address of the second region, in which the previous block of data is stored, for an address requested by a host if the number of seek operations exceeds a predetermined reference value, and transmits the block of data corresponding to the substituted address to the host.